using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace testApp
{
    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_REG_REQ
    {
        public UInt16 accessFlag;
        public UInt16 regAddr;
        public UInt32 regData;

        public R1000_REG_REQ(UInt16 accFlag, UInt16 addr, UInt32 data)
        {
            accessFlag = accFlag;
            regAddr = addr;
            regData = data;
        }
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_REG_RESP
    {
        public UInt16 rfu0;
        public UInt16 regAddr;
        public UInt32 regData;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_CMD_BEGIN
    {
        public byte ver;
        public byte flags;
        public ushort type;
        public ushort len;
        public ushort rsvd0;
        public uint cmd;
        public uint msCtr;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_CMD_END
    {
        public byte ver;
        public byte flags;
        public ushort type;
        public ushort len;
        public ushort rsvd0;
        public uint msCtr;
        public uint status;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_OEMCFG_READ
    {
        public byte ver;
        public byte flags;
        public ushort type;
        public ushort len;
        public ushort rsvd0;
        public uint addr;
        public uint data;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct R1000_ANT_BEGIN
    {
        public byte ver;
        public byte flags;
        public ushort type;
        public ushort len;
        public ushort rsvd0;
        public uint antIndex;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct SP_DEVINFO_DATA
    {
        public uint cbSize;
        public Guid ClassGuid;
        public uint DevInst;
        public IntPtr Reserved;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct SP_DEVICE_INTERFACE_DATA
    {
        public uint cbSize;
        public Guid InterfaceClassGuid;
        public uint Flags;
        public IntPtr Reserved;
    }

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct SP_DEVICE_INTERFACE_DETAIL_DATA
    {
        public UInt32 cbSize;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
        public string DevicePath;
    }
}